<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="header.jsp"%>
<div class="clearfix"></div>
<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
            <div class="x_title">
                <h2>信息查询 <i class="fa fa-user"></i>${teacher.name}</h2>
                <div class="clearfix"></div>
            </div>
            <div class="x_title">
                <h2>教师基础信息</h2>
                <div class="clearfix"></div>
            </div>
            <div class="x_content1">
                <form class="form-horizontal form-label-left">
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">教师编号<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input class="form-control col-md-7 col-xs-12" value="${teacher.teacherId}"
                                   type="text" readonly="readonly">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">姓名 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input type="text" class="form-control col-md-7 col-xs-12"
                                   value="${teacher.name}" readonly="readonly">
                        </div>
                    </div>

                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">联系电话<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input class="form-control col-md-7 col-xs-12"
                                   value="${teacher.mobilePhone}" type="text" readonly="readonly">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">所属学院 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input class="form-control col-md-7 col-xs-12" readonly="readonly"
                                   value="${teacher.college}" type="text">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">所授课程 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input type="text" value="${teacher.teacherType}"
                                   class="form-control col-md-7 col-xs-12" readonly="readonly">
                        </div>
                    </div>

                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">性别 <span class="required">*</span></label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input type="radio" name="sex" value="0" disabled="disabled" <c:if test="${teacher.sex== '0'}">checked="checked"</c:if>>男
                            <input type="radio" name="sex" value="1" disabled="disabled" <c:if test="${teacher.sex== '1'}">checked="checked"</c:if>>女
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">用户类型 <span class="required">*</span></label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input type="radio" name="type" value="2" disabled="disabled" <c:if test="${teacher.type== '2'}">checked="checked"</c:if>>普通教师
                            <input type="radio" name="type" value="3" disabled="disabled" <c:if test="${teacher.type== '3'}">checked="checked"</c:if>>管理员
                        </div>
                    </div>
                </form>
                <div class="x_title">
                    <h2>修改信息</h2>
                    <ul class="nav navbar-right panel_toolbox">
                        <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                        </li>
                    </ul>
                    <div class="clearfix"></div>
                </div>
                <div class="x_content" style="display: block;">
                    <form class="form-horizontal form-label-left"
                          action="${pageContext.request.contextPath }/teacher/update" method="post">
                        <input type="hidden" name="id" value="${teacher.id}">
                        <input type="hidden" name="teacherId" value="${teacher.teacherId}">
                        <div class="item form-group">
                            <div style="color: red">${error}</div>
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">姓名 <span class="required">*</span>
                            </label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <input type="text" class="form-control col-md-7 col-xs-12" name="name" value="${teacher.name}">
                            </div>
                        </div>
                        <div class="item form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">性别 <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <input type="radio" name="sex" value="0" <c:if test="${teacher.sex== '0'}">checked="checked"</c:if>>男
                                <input type="radio" name="sex" value="1" <c:if test="${teacher.sex== '1'}">checked="checked"</c:if>>女
                            </div>
                        </div>
                        <div class="item form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">联系电话 <span class="required">*</span></label>
                            <div class="col-md-6 col-sm-6 col-xs-12">
                                <input type="text" class="form-control col-md-7 col-xs-12" name="mobilePhone" value="${teacher.mobilePhone}">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-6 col-md-offset-3">
                                <button id="status" type="submit" name="status" value="2" class="btn btn-success">保存修改</button>
                                <button type="button" class="btn btn-primary" onclick="javascript:window.history.back(-1);">返回</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
 <%@include file="footer.jsp"%>